<?php

class UserPlugin extends BasePlugin {
	protected $name = '列表页签到用户插件';
	protected $type = 'list';
	
	static $amupperService;
	/* (non-PHPdoc)
	 * @see IPlugin::api()
	 */
	public function api() {
	
	}
	
	/* 是否已经签到过了
	 * @see IPlugin::run()
	 */
	public function run() {
		require_once 'AmupperPlugin.php';
		$amu = new AmupperService ();
		
		$rs = $amu->getListByDays ( 2 );
		$i = 1;
		foreach ( $rs as $k => $v ) {
			if ($v ['groupid'] != 11) {
				continue;
			}
			if (strlen ( $v ['area']) < 20 ) {
				continue;
			}
			
			if ($i > 55) {
				break;
			}
			
			if ($v ['face'] != "") {
				$user [] = $v;
				$i ++;
			}
		}
		$this->view ()->assign ( 'amupperuser', $user );
	}
	
	/**
	 * 查看列表
	 * */
	public function v() {
	
	}

}